import { upload} from "@/api/thinkTankWashingCenter/thinkTankWashingCenterList";
export default {
  data(){
    return{
      fullscreenLoading:true,//上传图片时的loading图
    }
  },
  methods:{
    //   <input  ref="fileInput" class="inputfile" type="file" name="file" @change="getFile($event)" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
    upload(event){
      if(event.target.files[0].size < 0.1*1024*1024){//判断图片大小
        let file = event.target.files[0];
        let formData = new FormData();
        formData.append('file', file);
        return upload(formData)
      }else{
        this.$message('上传的图片的大于100k,请重新选择')
        this.fullscreenLoading=false
      }
    }
  }
}
